
// 组件实例ComponentType
import {
    inputFormConfigType,
    inputNumberFormConfigType,
    swichFormConfigType,
    selectFormConfigType,
    slotFormConfigType,
    optionsSettingConfigType,
    optionsObjSettingConfigType,
    colorPickConfigType,
    customDataSourceConfigType
} from './EntityRightCompentElType'



//组件实例 得componentConfig配置项类型

export interface baseConfigType {
    field: inputFormConfigType
    label?: inputFormConfigType
    hideLabel?: swichFormConfigType
    required?: swichFormConfigType
    [key: string]: any
}

export interface inputConfigType extends Partial<baseConfigType> {
    placeholder: inputFormConfigType
    maxLength: inputNumberFormConfigType
}

export interface dateRangeConfigType extends Partial<baseConfigType> {
    valueFormat: selectFormConfigType<any>
    format: selectFormConfigType<any>
}

export interface radioGroupConfigType extends Partial<baseConfigType> {
    options: optionsSettingConfigType
}

export interface cascaderConfigType extends Partial<baseConfigType> {
  customOptionsSource: customDataSourceConfigType
}

export interface uploadConfigType extends Partial<baseConfigType> {
    action: inputFormConfigType
    data: optionsObjSettingConfigType
    headers: optionsObjSettingConfigType
    accept: inputFormConfigType
    multiple: swichFormConfigType
    limit: inputNumberFormConfigType
}

export interface tableConfigType extends Partial<baseConfigType> {
  tableColumns: optionsSettingConfigType
}


export interface spaceLayoutConfigType {
    field: inputFormConfigType //字段Key
    colNum: selectFormConfigType<any> //分栏数量
    gutter: inputNumberFormConfigType //分栏间距
}

export interface singleSelectConfigType extends baseConfigType {
    placeholder: selectFormConfigType<any>
    options: slotFormConfigType
}

export interface rateConfigType extends Partial<baseConfigType> {
  allowHalf: swichFormConfigType,
  count: inputNumberFormConfigType,
  grading:swichFormConfigType,
  allowClear:swichFormConfigType
}

export interface selectConfigType extends Partial<baseConfigType> {
  placeholder: inputFormConfigType
  options: optionsSettingConfigType
  allowClear: swichFormConfigType
  multiple: swichFormConfigType

}

export interface signatureConfigType extends Partial<baseConfigType> {
   dotSize: inputNumberFormConfigType
   penColor: colorPickConfigType
   backgroundColor: colorPickConfigType
}